package evol

import java.io.Serializable;
import org.apache.commons.lang.builder.HashCodeBuilder

class Odgovor implements Serializable{
	
	String korisnik
	Predmet idOd
	Predmet idDo
	float indeks
	Date datum

	
	boolean equals(other) {
		if (!(other instanceof Odgovor)) {
			return false
		}

		other.korisnik == korisnik && other.datum == datum &&
		 other.idOd==idOd && other.idDo==idDo
	}

	int hashCode() {
		def builder = new HashCodeBuilder()
		builder.append korisnik
		builder.append datum
		builder.append idOd
		builder.append idDo
		builder.toHashCode()
	}
	static mapping = {
		id composite: ['korisnik', 'datum','idOd','idDo']
	}
	
    static constraints = {
		
    }
}
